 let baseurl="https://www.shumutou.com/api/"
 export default function http(url,method,data){
   return new Promise((resolve,rej)=>{
    wx.request({
      url: baseurl+url,
      method:method,
      data:data,
      success:(res)=>{
        console.log("成功");
        console.log(res);
        if(res.data.success==1){
          resolve(res)
        }else{
          rej(res)
        }
            
      },
      fail:(res)=>{
        rej(res)
      }
    })
   })
     

 }